home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / PInterfaces / Video.p < prev    next >
Encoding:
Text File  |  1996-09-22  |  27.4 KB  |  656 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Video.p
  3.  
  4.      Contains:    Video Driver Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.1.4
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. }
  19.  
  20. {$IFC UNDEFINED UsingIncludes}
  21. {$SETC UsingIncludes := 0}
  22. {$ENDC}
  23.  
  24. {$IFC NOT UsingIncludes}
  25.  UNIT Video;
  26.  INTERFACE
  27. {$ENDC}
  28.  
  29. {$IFC UNDEFINED __VIDEO__}
  30. {$SETC __VIDEO__ := 1}
  31.  
  32. {$I+}
  33. {$SETC VideoIncludes := UsingIncludes}
  34. {$SETC UsingIncludes := 1}
  35.  
  36.  
  37. {$IFC UNDEFINED __QUICKDRAW__}
  38. {$I Quickdraw.p}
  39. {$ENDC}
  40. {    Types.p                                                        }
  41. {        ConditionalMacros.p                                        }
  42. {    MixedMode.p                                                    }
  43. {    QuickdrawText.p                                                }
  44.  
  45. {$PUSH}
  46. {$ALIGN MAC68K}
  47. {$LibExport+}
  48.  
  49. CONST
  50.     mBaseOffset                    = 1;                            {Id of mBaseOffset.}
  51.     mRowBytes                    = 2;                            {Video sResource parameter Id's }
  52.     mBounds                        = 3;                            {Video sResource parameter Id's }
  53.     mVersion                    = 4;                            {Video sResource parameter Id's }
  54.     mHRes                        = 5;                            {Video sResource parameter Id's }
  55.     mVRes                        = 6;                            {Video sResource parameter Id's }
  56.     mPixelType                    = 7;                            {Video sResource parameter Id's }
  57.     mPixelSize                    = 8;                            {Video sResource parameter Id's }
  58.     mCmpCount                    = 9;                            {Video sResource parameter Id's }
  59.     mCmpSize                    = 10;                            {Video sResource parameter Id's }
  60.     mPlaneBytes                    = 11;                            {Video sResource parameter Id's }
  61.     mVertRefRate                = 14;                            {Video sResource parameter Id's }
  62.     mVidParams                    = 1;                            {Video parameter block id.}
  63.     mTable                        = 2;                            {Offset to the table.}
  64.     mPageCnt                    = 3;                            {Number of pages}
  65.     mDevType                    = 4;                            {Device Type}
  66.     oneBitMode                    = 128;                            {Id of OneBitMode Parameter list.}
  67.     twoBitMode                    = 129;                            {Id of TwoBitMode Parameter list.}
  68.     fourBitMode                    = 130;                            {Id of FourBitMode Parameter list.}
  69.     eightBitMode                = 131;                            {Id of EightBitMode Parameter list.}
  70.  
  71.     sixteenBitMode                = 132;                            {Id of SixteenBitMode Parameter list.}
  72.     thirtyTwoBitMode            = 133;                            {Id of ThirtyTwoBitMode Parameter list.}
  73.     firstVidMode                = 128;                            {The new, better way to do the above. }
  74.     secondVidMode                = 129;                            { QuickDraw only supports six video }
  75.     thirdVidMode                = 130;                            { at this time.      }
  76.     fourthVidMode                = 131;
  77.     fifthVidMode                = 132;
  78.     sixthVidMode                = 133;
  79.     spGammaDir                    = 64;
  80.     spVidNamesDir                = 65;
  81.  
  82. { csTimingFormat values in VDTimingInfo }
  83. { look in the declaration rom for timing info }
  84.     kDeclROMtables                = 'decl';
  85.  
  86. { Timing mode constants for Display Manager MultiMode support
  87.     Corresponding    .h equates are in Video.h
  88.                     .a equates are in Video.a
  89.                     .r equates are in DepVideoEqu.r
  90.     
  91.     The first enum is the old names (for compatibility).
  92.     The second enum is the new names.
  93. }
  94.     timingApple12                = 130;                            {  512x384 (60 Hz) Rubik timing.}
  95.     timingApple12x                = 135;                            {  560x384 (60 Hz) Rubik-560 timing.}
  96.     timingApple13                = 140;                            {  640x480 (67 Hz) HR timing.}
  97.     timingApple13x                = 145;                            {  640x400 (67 Hz) HR-400 timing.}
  98.     timingAppleVGA                = 150;                            {  640x480  (60 Hz) VGA timing.}
  99.     timingApple15                = 160;                            {  640x870 (75 Hz) FPD timing.}
  100.     timingApple15x                = 165;                            {  640x818 (75 Hz) FPD-818 timing.}
  101.     timingApple16                = 170;                            {  832x624 (75 Hz) GoldFish timing.}
  102.     timingAppleSVGA                = 180;                            {  800x600  (56 Hz) SVGA timing.}
  103.     timingApple1Ka                = 190;                            { 1024x768 (60 Hz) VESA 1K-60Hz timing.}
  104.     timingApple1Kb                = 200;                            { 1024x768 (70 Hz) VESA 1K-70Hz timing.}
  105.     timingApple19                = 210;                            { 1024x768  (75 Hz) Apple 19" RGB.}
  106.     timingApple21                = 220;                            { 1152x870  (75 Hz) Apple 21" RGB.}
  107.  
  108.     timingInvalid                = 0;                            { Unknown timing… force user to confirm.}
  109.     timingApple_512x384_60hz    = 130;                            {  512x384  (60 Hz) Rubik timing.}
  110.     timingApple_560x384_60hz    = 135;                            {  560x384  (60 Hz) Rubik-560 timing.}
  111.     timingApple_640x480_67hz    = 140;                            {  640x480  (67 Hz) HR timing.}
  112.     timingApple_640x400_67hz    = 145;                            {  640x400  (67 Hz) HR-400 timing.}
  113.     timingVESA_640x480_60hz        = 150;                            {  640x480  (60 Hz) VGA timing.}
  114.     timingApple_640x870_75hz    = 160;                            {  640x870  (75 Hz) FPD timing.}
  115.     timingApple_640x818_75hz    = 165;                            {  640x818  (75 Hz) FPD-818 timing.}
  116.     timingApple_832x624_75hz    = 170;                            {  832x624  (75 Hz) GoldFish timing.}
  117.     timingVESA_800x600_56hz        = 180;                            {  800x600  (56 Hz) SVGA timing.}
  118.     timingVESA_800x600_60hz        = 182;                            {  800x600  (60 Hz) SVGA timing.}
  119.     timingVESA_800x600_72hz        = 184;                            {  800x600  (72 Hz) SVGA timing.}
  120.     timingVESA_800x600_75hz        = 186;                            {  800x600  (75 Hz) SVGA timing.}
  121.     timingVESA_1024x768_60hz    = 190;                            { 1024x768  (60 Hz) VESA 1K-60Hz timing.}
  122.     timingVESA_1024x768_70hz    = 200;                            { 1024x768  (70 Hz) VESA 1K-70Hz timing.}
  123.     timingVESA_1024x768_75hz    = 204;                            { 1024x768  (75 Hz) VESA 1K-70Hz timing (very similar to timingApple_1024x768_75hz).}
  124.     timingApple_1024x768_75hz    = 210;                            { 1024x768  (75 Hz) Apple 19" RGB.}
  125.     timingApple_1152x870_75hz    = 220;                            { 1152x870  (75 Hz) Apple 21" RGB.}
  126.     timingAppleNTSC_ST            = 230;                            {  512x384  (60 Hz, interlaced, non-convolved).}
  127.     timingAppleNTSC_FF            = 232;                            {  640x480  (60 Hz, interlaced, non-convolved).}
  128.     timingAppleNTSC_STconv        = 234;                            {  512x384  (60 Hz, interlaced, convolved).}
  129.     timingAppleNTSC_FFconv        = 236;                            {  640x480  (60 Hz, interlaced, convolved).}
  130.     timingApplePAL_ST            = 238;                            {  640x480  (50 Hz, interlaced, non-convolved).}
  131.     timingApplePAL_FF            = 240;                            {  768x576  (50 Hz, interlaced, non-convolved).}
  132.     timingApplePAL_STconv        = 242;                            {  640x480  (50 Hz, interlaced, convolved).}
  133.     timingApplePAL_FFconv        = 244;                            {  768x576  (50 Hz, interlaced, convolved).}
  134.     timingVESA_1280x960_75hz    = 250;                            { 1280x960  (75 Hz)}
  135.     timingVESA_1280x1024_60hz    = 260;                            { 1280x1024 (60 Hz)}
  136.     timingVESA_1280x1024_75hz    = 262;                            { 1280x1024 (75 Hz)}
  137.     timingVESA_1600x1200_60hz    = 280;                            { 1600x1200 (60 Hz) VESA proposed timing.}
  138.     timingVESA_1600x1200_65hz    = 282;                            { 1600x1200 (65 Hz) VESA proposed timing.}
  139.     timingVESA_1600x1200_70hz    = 284;                            { 1600x1200 (70 Hz) VESA proposed timing.}
  140.     timingVESA_1600x1200_75hz    = 286;                            { 1600x1200 (75 Hz) VESA proposed timing.}
  141.     timingVESA_1600x1200_80hz    = 288;                            { 1600x1200 (80 Hz) VESA proposed timing (pixel clock is 216 Mhz dot clock).}
  142.  
  143. { csConnectFlags values in VDDisplayConnectInfo }
  144.     kAllModesValid                = 0;                            { All modes not trimmed by primary init are good close enough to try }
  145.     kAllModesSafe                = 1;                            { All modes not trimmed by primary init are know to be safe }
  146.     kReportsTagging                = 2;                            { Can detect tagged displays (to identify smart monitors) }
  147.     kHasDirectConnection        = 3;                            { True implies that driver can talk directly to device (e.g. serial data link via sense lines) }
  148.     kIsMonoDev                    = 4;                            { Says whether there’s an RGB (0) or Monochrome (1) connection. }
  149.     kUncertainConnection        = 5;                            { There may not be a display (no sense lines?). }
  150.     kTaggingInfoNonStandard        = 6;                            { Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). }
  151.     kReportsDDCConnection        = 7;                            { Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). }
  152.     kHasDDCConnection            = 8;                            { Card has ddc connect now. }
  153.  
  154. { csDisplayType values in VDDisplayConnectInfo }
  155.     kUnknownConnect                = 1;                            { Not sure how we’ll use this, but seems like a good idea. }
  156.     kPanelConnect                = 2;                            { For use with fixed-in-place LCD panels. }
  157.     kPanelTFTConnect            = 2;                            { Alias for kPanelConnect }
  158.     kFixedModeCRTConnect        = 3;                            {  For use with fixed-mode (i.e., very limited range) displays. }
  159.     kMultiModeCRT1Connect        = 4;                            { 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe }
  160.     kMultiModeCRT2Connect        = 5;                            { 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe }
  161.     kMultiModeCRT3Connect        = 6;                            { 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain }
  162.     kMultiModeCRT4Connect        = 7;                            { Expansion to large multi mode (not yet used) }
  163.     kModelessConnect            = 8;                            { Expansion to modeless model (not yet used) }
  164.     kFullPageConnect            = 9;                            { 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) }
  165.     kVGAConnect                    = 10;                            { 640x480 VGA default -- question everything else }
  166.     kNTSCConnect                = 11;                            { NTSC ST (default), FF, STconv, FFconv }
  167.     kPALConnect                    = 12;                            { PAL ST (default), FF, STconv, FFconv }
  168.     kHRConnect                    = 13;                            { Straight-6 connect -- 640x480 and 640x400 (to get 8bpp in 256K case) (these two only) }
  169.     kPanelFSTNConnect            = 14;                            { For use with fixed-in-place LCD FSTN (aka “Supertwist”) panels }
  170.     kMonoTwoPageConnect            = 15;                            { 1152x870 Apple color two-page display }
  171.     kColorTwoPageConnect        = 16;                            { 1152x870 Apple B&W two-page display }
  172.     kColor16Connect                = 17;                            { 832x624 Apple B&W two-page display }
  173.     kColor19Connect                = 18;                            { 1024x768 Apple B&W two-page display }
  174.  
  175. { csTimingFlags values in VDTimingInfoRec }
  176.     kModeValid                    = 0;                            { Says that this mode should NOT be trimmed. }
  177.     kModeSafe                    = 1;                            { This mode does not need confirmation }
  178.     kModeDefault                = 2;                            { This is the default mode for this type of connection }
  179.     kModeShowNow                = 3;                            { This mode should always be shown (even though it may require a confirm) }
  180.     kModeNotResize                = 4;                            { This mode should not be used to resize the display (eg. mode selects a different connector on card) }
  181.     kModeRequiresPan            = 5;                            { This mode has more pixels than are actually displayed }
  182.  
  183. { csResolutionFlags bit flags for VDResolutionInfoRec }
  184.     kResolutionHasMultipleDepthSizes = 0;                        { Says that this mode has different csHorizontalPixels, csVerticalLines at different depths (usually slightly larger at lower depths) }
  185.  
  186. {    Power Mode constants for VDPowerStateRec.powerState.    }
  187.     kAVPowerOff                    = 0;
  188.     kAVPowerStandby                = 1;
  189.     kAVPowerSuspend                = 2;
  190.     kAVPowerOn                    = 3;
  191.  
  192. {    Power Mode masks and bits for VDPowerStateRec.powerFlags.    }
  193.     kPowerStateNeedsRefresh        = 0;
  194.     kPowerStateNeedsRefreshMask    = 0+(1 * (2**(0)));
  195.  
  196. { Control Codes }
  197.     cscReset                    = 0;
  198.     cscKillIO                    = 1;
  199.     cscSetMode                    = 2;
  200.     cscSetEntries                = 3;
  201.     cscSetGamma                    = 4;
  202.     cscGrayPage                    = 5;
  203.     cscGrayScreen                = 5;
  204.     cscSetGray                    = 6;
  205.     cscSetInterrupt                = 7;
  206.     cscDirectSetEntries            = 8;
  207.     cscSetDefaultMode            = 9;
  208.     cscSwitchMode                = 10;
  209.     cscSetSync                    = 11;
  210.     cscUnusedCall                = 127;                            { This call used to expend the scrn resource.  Its imbedded data contains more control info }
  211.  
  212. { Status Codes }
  213.     cscGetMode                    = 2;
  214.     cscGetEntries                = 3;
  215.     cscGetPageCnt                = 4;
  216.     cscGetPages                    = 4;                            { This is what C&D 2 calls it. }
  217.     cscGetPageBase                = 5;
  218.     cscGetBaseAddr                = 5;                            { This is what C&D 2 calls it. }
  219.     cscGetGray                    = 6;
  220.     cscGetInterrupt                = 7;
  221.     cscGetGamma                    = 8;
  222.     cscGetDefaultMode            = 9;
  223.     cscGetCurMode                = 10;
  224.     cscGetSync                    = 11;
  225.     cscGetConnection            = 12;                            { Return information about the connection to the display }
  226.     cscGetModeTiming            = 13;                            { Return timing info for a mode }
  227.     cscGetModeBaseAddress        = 14;                            { Return base address information about a particular mode }
  228.     cscGetScanProc                = 15;                            { QuickTime scan chasing routine }
  229.     cscSavePreferredConfiguration = 16;
  230.     cscSetHardwareCursor        = 22;
  231.     cscDrawHardwareCursor        = 23;
  232.     cscSetConvolution            = 24;
  233.     cscSetPowerState            = 25;
  234.     cscPrivateControlCall        = 26;                            {  Takes a VDPrivateSelectorDataRec }
  235.     cscSetMultiConnect            = 28;                            {  From a GDI point of view, this call should be implemented completely in the HAL and not at all in the core. }
  236.     cscSetClutBehavior            = 29;                            {  Takes a VDClutBehavior  }
  237.  
  238. { Bit definitions for the Get/Set Sync call}
  239.     kDisableHorizontalSyncBit    = 0;
  240.     kDisableVerticalSyncBit        = 1;
  241.     kDisableCompositeSyncBit    = 2;
  242.     kEnableSyncOnBlue            = 3;
  243.     kEnableSyncOnGreen            = 4;
  244.     kEnableSyncOnRed            = 5;
  245.     kNoSeparateSyncControlBit    = 6;
  246.     kHorizontalSyncMask            = $01;
  247.     kVerticalSyncMask            = $02;
  248.     kCompositeSyncMask            = $04;
  249.     kDPMSSyncMask                = $7;
  250.     kSyncOnBlueMask                = $08;
  251.     kSyncOnGreenMask            = $10;
  252.     kSyncOnRedMask                = $20;
  253.     kSyncOnMask                    = $38;
  254.  
  255. {    Power Mode constants for translating DPMS modes to Get/SetSync calls.    }
  256.     kDPMSSyncOn                    = 0;
  257.     kDPMSSyncStandby            = 1;
  258.     kDPMSSyncSuspend            = 2;
  259.     kDPMSSyncOff                = 7;
  260.  
  261. {  Bit definitions for the Get/Set Convolution call }
  262.     kConvolved                    = 0;
  263.     kLiveVideoPassThru            = 1;
  264.     kConvolvedMask                = $01;
  265.     kLiveVideoPassThruMask        = $02;
  266.  
  267. TYPE
  268.     VPBlock = RECORD
  269.         vpBaseOffset:            LONGINT;                                {Offset to page zero of video RAM (From minorBaseOS).}
  270.         vpRowBytes:                INTEGER;                                {Width of each row of video memory.}
  271.         vpBounds:                Rect;                                    {BoundsRect for the video display (gives dimensions).}
  272.         vpVersion:                INTEGER;                                {PixelMap version number.}
  273.         vpPackType:                INTEGER;
  274.         vpPackSize:                LONGINT;
  275.         vpHRes:                    LONGINT;                                {Horizontal resolution of the device (pixels per inch).}
  276.         vpVRes:                    LONGINT;                                {Vertical resolution of the device (pixels per inch).}
  277.         vpPixelType:            INTEGER;                                {Defines the pixel type.}
  278.         vpPixelSize:            INTEGER;                                {Number of bits in pixel.}
  279.         vpCmpCount:                INTEGER;                                {Number of components in pixel.}
  280.         vpCmpSize:                INTEGER;                                {Number of bits per component}
  281.         vpPlaneBytes:            LONGINT;                                {Offset from one plane to the next.}
  282.     END;
  283.  
  284.     VPBlockPtr = ^VPBlock;
  285.  
  286.     VDEntryRecord = RECORD
  287.         csTable:                Ptr;                                    {(long) pointer to color table entry=value, r,g,b:INTEGER}
  288.     END;
  289.  
  290.     VDEntRecPtr = ^VDEntryRecord;
  291.  
  292. { Parm block for SetGray control call }
  293.     VDGrayRecord = RECORD
  294.         csMode:                    BOOLEAN;                                {Same as GDDevType value (0=color, 1=mono)}
  295.     END;
  296.  
  297.     VDGrayPtr = ^VDGrayRecord;
  298.  
  299. { Parm block for SetInterrupt call }
  300.     VDFlagRecord = RECORD
  301.         csMode:                    SInt8;
  302.     END;
  303.  
  304.     VDFlagRecPtr = ^VDFlagRecord;
  305.  
  306. { Parm block for SetEntries control call }
  307.     VDSetEntryRecord = RECORD
  308.         csTable:                ^ColorSpec;                                {Pointer to an array of color specs}
  309.         csStart:                INTEGER;                                {Which spec in array to start with, or -1}
  310.         csCount:                INTEGER;                                {Number of color spec entries to set}
  311.     END;
  312.  
  313.     VDSetEntryPtr = ^VDSetEntryRecord;
  314.  
  315. { Parm block for SetGamma control call }
  316.     VDGammaRecord = RECORD
  317.         csGTable:                Ptr;                                    {pointer to gamma table}
  318.     END;
  319.  
  320.     VDGamRecPtr = ^VDGammaRecord;
  321.  
  322.     VDBaseAddressInfoRec = RECORD
  323.         csDevData:                LONGINT;                                { LONGINT - (long) timing mode }
  324.         csDevBase:                LONGINT;                                { LONGINT - (long) base address of the mode }
  325.         csModeReserved:            INTEGER;                                { INTEGER - (short) will some day be the depth }
  326.         csModeBase:                LONGINT;                                { LONGINT - (long) reserved }
  327.     END;
  328.  
  329.     VDBaseAddressInfoPtr = ^VDBaseAddressInfoRec;
  330.  
  331.     VDSwitchInfoRec = RECORD
  332.         csMode:                    INTEGER;                                {(word) mode depth}
  333.         csData:                    LONGINT;                                {(long) functional sResource of mode}
  334.         csPage:                    INTEGER;                                {(word) page to switch in}
  335.         csBaseAddr:                Ptr;                                    {(long) base address of page (return value)}
  336.         csReserved:                LONGINT;                                {(long) Reserved (set to 0) }
  337.     END;
  338.  
  339.     VDSwitchInfoPtr = ^VDSwitchInfoRec;
  340.  
  341.     VDTimingInfoRec = RECORD
  342.         csTimingMode:            LONGINT;                                { LONGINT - (long) timing mode (a la InitGDevice) }
  343.         csTimingReserved:        LONGINT;                                { LONGINT - (long) reserved }
  344.         csTimingFormat:            LONGINT;                                { LONGINT - (long) what format is the timing info }
  345.         csTimingData:            LONGINT;                                { LONGINT - (long) data supplied by driver }
  346.         csTimingFlags:            LONGINT;                                { LONGINT - (long) mode within device }
  347.     END;
  348.  
  349.     VDTimingInfoPtr = ^VDTimingInfoRec;
  350.  
  351.     VDDisplayConnectInfoRec = RECORD
  352.         csDisplayType:            INTEGER;                                { INTEGER - (word) Type of display connected }
  353.         csConnectTaggedType:    SInt8; (* unsigned char *)                { BYTE - type of tagging }
  354.         csConnectTaggedData:    SInt8; (* unsigned char *)                { BYTE - tagging data }
  355.         csConnectFlags:            LONGINT;                                { LONGINT - (long) tell us about the connection }
  356.         csDisplayComponent:        LONGINT;                                { LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE) }
  357.         csConnectReserved:        LONGINT;                                { LONGINT - (long) reserved }
  358.     END;
  359.  
  360.     VDDisplayConnectInfoPtr = ^VDDisplayConnectInfoRec;
  361.  
  362. { RawSenseCode
  363.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  364.     for the possible raw sense code values when 'standard' sense code hardware is implemented.
  365.  
  366.     For 'standard' sense code hardware, the raw sense is obtained as follows:
  367.         • Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines
  368.         • Read the state of the monitor sense lines 2, 1, and 0.  (2 is the MSB, 0 the LSB)
  369.  
  370.     IMPORTANT Note: 
  371.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  372.     are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo' 
  373.  
  374. }
  375.     RawSenseCode = CHAR;
  376.  
  377.  
  378. CONST
  379.     kRSCZero                    = 0;
  380.     kRSCOne                        = 1;
  381.     kRSCTwo                        = 2;
  382.     kRSCThree                    = 3;
  383.     kRSCFour                    = 4;
  384.     kRSCFive                    = 5;
  385.     kRSCSix                        = 6;
  386.     kRSCSeven                    = 7;
  387.  
  388. { ExtendedSenseCode
  389.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  390.     for the values which are possible when the extended sense algorithm is applied to hardware
  391.     which implements 'standard' sense code hardware.
  392.  
  393.      For 'standard' sense code hardware, the extended sense code algorithm is as follows:
  394.     (Note:  as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0')
  395.         • Drive sense line 'A' low and read the values of 'B' and 'C'.  
  396.         • Drive sense line 'B' low and read the values of 'A' and 'C'.
  397.         • Drive sense line 'C' low and read the values of 'A' and 'B'.
  398.  
  399.     In this way, a six-bit number of the form BC/AC/AB is generated. 
  400.  
  401.     IMPORTANT Note: 
  402.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  403.     are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo' 
  404.  
  405. }
  406.     
  407. TYPE
  408.     ExtendedSenseCode = CHAR;
  409.  
  410.  
  411. CONST
  412.     kESCZero21Inch                = $00;                            { 21" RGB                                 }
  413.     kESCOnePortraitMono            = $14;                            { Portrait Monochrome                     }
  414.     kESCTwo12Inch                = $21;                            { 12" RGB                                }
  415.     kESCThree21InchRadius        = $31;                            { 21" RGB (Radius)                        }
  416.     kESCThree21InchMonoRadius    = $34;                            { 21" Monochrome (Radius)                 }
  417.     kESCThree21InchMono            = $35;                            { 21" Monochrome                        }
  418.     kESCFourNTSC                = $0A;                            { NTSC                                 }
  419.     kESCFivePortrait            = $1E;                            { Portrait RGB                         }
  420.     kESCSixMSB1                    = $03;                            { MultiScan Band-1 (12" thru 1Six")    }
  421.     kESCSixMSB2                    = $0B;                            { MultiScan Band-2 (13" thru 19")        }
  422.     kESCSixMSB3                    = $23;                            { MultiScan Band-3 (13" thru 21")        }
  423.     kESCSixStandard                = $2B;                            { 13"/14" RGB or 12" Monochrome        }
  424.     kESCSevenPAL                = $00;                            { PAL                                    }
  425.     kESCSevenNTSC                = $14;                            { NTSC                                 }
  426.     kESCSevenVGA                = $17;                            { VGA                                     }
  427.     kESCSeven16Inch                = $2D;                            { 16" RGB (GoldFish)                      }
  428.     kESCSevenPALAlternate        = $30;                            { PAL (Alternate)                         }
  429.     kESCSeven19Inch                = $3A;                            { Third-Party 19”                        }
  430.     kESCSevenNoDisplay            = $3F;                            { No display connected                 }
  431.  
  432. { DepthMode
  433.     This abstract data type is used to to reference RELATIVE pixel depths.
  434.     Its definition is largely derived from its past usage, analogous to 'xxxVidMode'
  435.  
  436.     Bits per pixel DOES NOT directly map to 'DepthMode'  For example, on some
  437.     graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
  438.     hardware, 'kDepthMode1' may represent 8BPP.
  439.  
  440.     DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc.
  441.     behave as expected.  The values of the constants which comprise the set are such
  442.     that 'kDepthMode4 < kDepthMode6' behaves as expected.
  443. }
  444.     
  445. TYPE
  446.     DepthMode = INTEGER;
  447.  
  448.  
  449. CONST
  450.     kDepthMode1                    = 128;
  451.     kDepthMode2                    = 129;
  452.     kDepthMode3                    = 130;
  453.     kDepthMode4                    = 131;
  454.     kDepthMode5                    = 132;
  455.     kDepthMode6                    = 133;
  456.  
  457.     kFirstDepthMode                = 128;                            { These constants are obsolete, and just included    }
  458.     kSecondDepthMode            = 129;                            { for clients that have converted to the above        }
  459.     kThirdDepthMode                = 130;                            { kDepthModeXXX constants.                            }
  460.     kFourthDepthMode            = 131;
  461.     kFifthDepthMode                = 132;
  462.     kSixthDepthMode                = 133;
  463.  
  464.  
  465. TYPE
  466.     VDPageInfo = RECORD
  467.         csMode:                    INTEGER;                                {(word) mode within device}
  468.         csData:                    LONGINT;                                {(long) data supplied by driver}
  469.         csPage:                    INTEGER;                                {(word) page to switch in}
  470.         csBaseAddr:                Ptr;                                    {(long) base address of page}
  471.     END;
  472.  
  473.     VDPgInfoPtr = ^VDPageInfo;
  474.  
  475.     VDSizeInfo = RECORD
  476.         csHSize:                INTEGER;                                {(word) desired/returned h size}
  477.         csHPos:                    INTEGER;                                {(word) desired/returned h position}
  478.         csVSize:                INTEGER;                                {(word) desired/returned v size}
  479.         csVPos:                    INTEGER;                                {(word) desired/returned v position}
  480.     END;
  481.  
  482.     VDSzInfoPtr = ^VDSizeInfo;
  483.  
  484.     VDSettings = RECORD
  485.         csParamCnt:                INTEGER;                                {(word) number of params}
  486.         csBrightMax:            INTEGER;                                {(word) max brightness}
  487.         csBrightDef:            INTEGER;                                {(word) default brightness}
  488.         csBrightVal:            INTEGER;                                {(word) current brightness}
  489.         csCntrstMax:            INTEGER;                                {(word) max contrast}
  490.         csCntrstDef:            INTEGER;                                {(word) default contrast}
  491.         csCntrstVal:            INTEGER;                                {(word) current contrast}
  492.         csTintMax:                INTEGER;                                {(word) max tint}
  493.         csTintDef:                INTEGER;                                {(word) default tint}
  494.         csTintVal:                INTEGER;                                {(word) current tint}
  495.         csHueMax:                INTEGER;                                {(word) max hue}
  496.         csHueDef:                INTEGER;                                {(word) default hue}
  497.         csHueVal:                INTEGER;                                {(word) current hue}
  498.         csHorizDef:                INTEGER;                                {(word) default horizontal}
  499.         csHorizVal:                INTEGER;                                {(word) current horizontal}
  500.         csHorizMax:                INTEGER;                                {(word) max horizontal}
  501.         csVertDef:                INTEGER;                                {(word) default vertical}
  502.         csVertVal:                INTEGER;                                {(word) current vertical}
  503.         csVertMax:                INTEGER;                                {(word) max vertical}
  504.     END;
  505.  
  506.     VDSettingsPtr = ^VDSettings;
  507.  
  508.     VDDefMode = RECORD
  509.         csID:                    SInt8; (* UInt8 *)
  510.     END;
  511.  
  512.     VDDefModePtr = ^VDDefMode;
  513.  
  514.     VDSyncInfoRec = RECORD
  515.         csMode:                    SInt8; (* UInt8 *)
  516.         csFlags:                SInt8; (* UInt8 *)
  517.     END;
  518.  
  519.     VDSyncInfoPtr = ^VDSyncInfoRec;
  520.  
  521.     DisplayModeID                        = LONGINT;
  522.     VideoDeviceType                        = LONGINT;
  523.     GammaTableID                        = LONGINT;
  524. {  Constants for the GetNextResolution call  }
  525.  
  526. CONST
  527.     kDisplayModeIDCurrent        = $00;                            {  Reference the Current DisplayModeID  }
  528.     kDisplayModeIDInvalid        = $FFFFFFFF;                    {  A bogus DisplayModeID in all cases  }
  529.     kDisplayModeIDFindFirstResolution = $FFFFFFFE;                {  Used in cscGetNextResolution to reset iterator  }
  530.     kDisplayModeIDNoMoreResolutions = $FFFFFFFD;                {  Used in cscGetNextResolution to indicate End Of List  }
  531.  
  532. {  Constants for the GetGammaInfoList call  }
  533.     kGammaTableIDFindFirst        = $FFFFFFFE;                    {  Get the first gamma table ID  }
  534.     kGammaTableIDNoMoreTables    = $FFFFFFFD;                    {  Used to indicate end of list  }
  535.     kGammaTableIDSpecific        = $00;                            {  Return the info for the given table id  }
  536.  
  537.  
  538. TYPE
  539.     VDResolutionInfoRecPtr = ^VDResolutionInfoRec;
  540.     VDResolutionInfoRec = RECORD
  541.         csPreviousDisplayModeID: DisplayModeID;                            {  ID of the previous resolution in a chain  }
  542.         csDisplayModeID:        DisplayModeID;                            {  ID of the next resolution  }
  543.         csHorizontalPixels:        LONGINT;                                {  # of pixels in a horizontal line at the max depth  }
  544.         csVerticalLines:        LONGINT;                                {  # of lines in a screen at the max depth  }
  545.         csRefreshRate:            Fixed;                                    {  Vertical Refresh Rate in Hz  }
  546.         csMaxDepthMode:            DepthMode;                                {  0x80-based number representing max bit depth  }
  547.         csResolutionFlags:        LONGINT;                                {  Reserved - flag bits  }
  548.         csReserved:                LONGINT;                                {  Reserved  }
  549.     END;
  550.  
  551.     VDResolutionInfoPtr                    = ^VDResolutionInfoRec;
  552.     VDVideoParametersInfoRecPtr = ^VDVideoParametersInfoRec;
  553.     VDVideoParametersInfoRec = RECORD
  554.         csDisplayModeID:        DisplayModeID;                            {  the ID of the resolution we want info on  }
  555.         csDepthMode:            DepthMode;                                {  The bit depth we want the info on (0x80 based)  }
  556.         csVPBlockPtr:            VPBlockPtr;                                {  Pointer to a video parameter block  }
  557.         csPageCount:            LONGINT;                                {  Number of pages supported by the resolution  }
  558.         csDeviceType:            VideoDeviceType;                        {  Device Type:  Direct, Fixed or CLUT;  }
  559.         csReserved:                LONGINT;                                {  Reserved  }
  560.     END;
  561.  
  562.     VDVideoParametersInfoPtr            = ^VDVideoParametersInfoRec;
  563.     VDGammaInfoRecPtr = ^VDGammaInfoRec;
  564.     VDGammaInfoRec = RECORD
  565.         csLastGammaID:            GammaTableID;                            {  the ID of the previous gamma table  }
  566.         csNextGammaID:            GammaTableID;                            {  the ID of the next gamma table  }
  567.         csGammaPtr:                Ptr;                                    {  Ptr to a gamma table data  }
  568.         csReserved:                LONGINT;                                {  Reserved  }
  569.     END;
  570.  
  571.     VDGammaInfoPtr                        = ^VDGammaInfoRec;
  572.     VDGetGammaListRecPtr = ^VDGetGammaListRec;
  573.     VDGetGammaListRec = RECORD
  574.         csPreviousGammaTableID:    GammaTableID;                            {  ID of the previous gamma table  }
  575.         csGammaTableID:            GammaTableID;                            {  ID of the gamma table following csPreviousDisplayModeID  }
  576.         csGammaTableSize:        LONGINT;                                {  Size of the gamma table in bytes  }
  577.         csGammaTableName:        CStringPtr;                                {  Gamma table name (c-string)  }
  578.     END;
  579.  
  580.     VDGetGammaListPtr                    = ^VDGetGammaListRec;
  581.     VDRetrieveGammaRecPtr = ^VDRetrieveGammaRec;
  582.     VDRetrieveGammaRec = RECORD
  583.         csGammaTableID:            GammaTableID;                            {  ID of gamma table to retrieve  }
  584.         csGammaTablePtr:        GammaTblPtr;                            {  Location to copy desired gamma to  }
  585.     END;
  586.  
  587.     VDRetrieveGammaPtr                    = ^VDRetrieveGammaRec;
  588.     VDSetHardwareCursorRecPtr = ^VDSetHardwareCursorRec;
  589.     VDSetHardwareCursorRec = RECORD
  590.         csCursorRef:            Ptr;                                    {  reference to cursor data  }
  591.         csReserved1:            UInt32;                                    {  reserved for future use  }
  592.         csReserved2:            UInt32;                                    {  should be ignored  }
  593.     END;
  594.  
  595.     VDSetHardwareCursorPtr                = ^VDSetHardwareCursorRec;
  596.     VDDrawHardwareCursorRecPtr = ^VDDrawHardwareCursorRec;
  597.     VDDrawHardwareCursorRec = RECORD
  598.         csCursorX:                SInt32;                                    {  x coordinate  }
  599.         csCursorY:                SInt32;                                    {  y coordinate  }
  600.         csCursorVisible:        UInt32;                                    {  true if cursor is must be visible  }
  601.         csReserved1:            UInt32;                                    {  reserved for future use  }
  602.         csReserved2:            UInt32;                                    {  should be ignored  }
  603.     END;
  604.  
  605.     VDDrawHardwareCursorPtr                = ^VDDrawHardwareCursorRec;
  606.     VDSupportsHardwareCursorRecPtr = ^VDSupportsHardwareCursorRec;
  607.     VDSupportsHardwareCursorRec = RECORD
  608.         csSupportsHardwareCursor: UInt32;
  609.                                                                         {  true if hardware cursor is supported  }
  610.         csReserved1:            UInt32;                                    {  reserved for future use  }
  611.         csReserved2:            UInt32;                                    {  must be zero  }
  612.     END;
  613.  
  614.     VDSupportsHardwareCursorPtr            = ^VDSupportsHardwareCursorRec;
  615.     VDHardwareCursorDrawStateRecPtr = ^VDHardwareCursorDrawStateRec;
  616.     VDHardwareCursorDrawStateRec = RECORD
  617.         csCursorX:                SInt32;                                    {  x coordinate  }
  618.         csCursorY:                SInt32;                                    {  y coordinate  }
  619.         csCursorVisible:        UInt32;                                    {  true if cursor is visible  }
  620.         csCursorSet:            UInt32;                                    {  true if cursor successfully set by last set control call  }
  621.         csReserved1:            UInt32;                                    {  reserved for future use  }
  622.         csReserved2:            UInt32;                                    {  must be zero  }
  623.     END;
  624.  
  625.     VDHardwareCursorDrawStatePtr        = ^VDHardwareCursorDrawStateRec;
  626.     VDConvolutionInfoRecPtr = ^VDConvolutionInfoRec;
  627.     VDConvolutionInfoRec = RECORD
  628.         csDisplayModeID:        DisplayModeID;                            {  the ID of the resolution we want info on  }
  629.         csDepthMode:            DepthMode;                                {  The bit depth we want the info on (0x80 based)  }
  630.         csPage:                    LONGINT;
  631.         csFlags:                UInt32;
  632.         csReserved:                UInt32;
  633.     END;
  634.  
  635.     VDConvolutionInfoPtr                = ^VDConvolutionInfoRec;
  636.     VDPowerStateRecPtr = ^VDPowerStateRec;
  637.     VDPowerStateRec = RECORD
  638.         powerState:                LONGINT;
  639.         powerFlags:                LONGINT;
  640.         powerReserved1:            LONGINT;
  641.         powerReserved2:            LONGINT;
  642.     END;
  643.  
  644.     VDPowerStatePtr                        = ^VDPowerStateRec;
  645.  
  646. {$ALIGN RESET}
  647. {$POP}
  648.  
  649. {$SETC UsingIncludes := VideoIncludes}
  650.  
  651. {$ENDC} {__VIDEO__}
  652.  
  653. {$IFC NOT UsingIncludes}
  654.  END.
  655. {$ENDC}
  656.